package com.neuedu.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.neuedu.dao.PurchasingDao;
import com.neuedu.model.Purchasing;
import com.neuedu.service.PurchasingService;

@Service
public class PurchasingServiceImpl implements PurchasingService {

	// 依赖注入
	@Autowired
	private PurchasingDao PurchasingDao;
	
	public void setPurchasingDao(PurchasingDao PurchasingDao) {
		this.PurchasingDao = PurchasingDao;
	}
	
	@Override
	public int countPurchasing() {
		return PurchasingDao.countPurchasing();
	}

	@Override
	public List<Purchasing> findAll(Map<String, Object> map) {
		return PurchasingDao.findAll(map);
	}

	@Override
	public int addPurchasing(Purchasing u) {
		return PurchasingDao.addPurchasing(u);
	}

	@Override
	public int updatePurchasing(Purchasing u) {
		return PurchasingDao.updatePurchasing(u);
	}

	@Override
	public int deletePurchasing(int id) {
		return PurchasingDao.deletePurchasing(id);
	}

}
